package com.qymerge.manage.user.enums;

/**
 * 分拥角色
 * Created by chen.qiu on 2017/10/26.
 */
public enum CommissionRoleTypes {

    CO(1, "公司"),
    BD(2, "BD"),
    AG(3, "机构"),
    EM(4, "机构员工");

    CommissionRoleTypes(){}

    CommissionRoleTypes(int status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    private int status;
    private String desc;

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static CommissionRoleTypes get(int status) {
        for (CommissionRoleTypes types : CommissionRoleTypes.values()) {
            if (types.getStatus() == status) {
                return types;
            }
        }
        return null;
    }

}
